package com.hiwhitley.easy.day15;

/**
 * Created by hiwhitley on 2016/8/20.
 */
public class TrailingZeroes {
    public static int trailingZeroes(int n) {
        if (n < 1) return 0;
        int c = 0;

        while (n / 5 != 0) {
            n /= 5;
            c += n;
        }

        return c;
    }

    public static void main(String[] args) {
        System.out.println(trailingZeroes(25));
    }
}
